<div class="paragraph">
<p>If a function and a specialization of a function template are deemed equivalent after overload resolution, the non-specialized function will be chosen over the function specialization, which may be inconsistent with developer expectations.</p>
</div>
<div class="sect1">
<h2 id="_noncompliant_code_example">Noncompliant Code Example</h2>
<div class="sectionbody">
<div class="listingblock">
<div class="content">
<pre>void f ( short ); // Example 1
template &lt;typename T&gt; void f ( T ); // Example 2
void b ( short s )
{
  f ( s ); // Noncompliant - Calls Example 1
  f ( s + 1 ); // Noncompliant - Calls Example 2
}</pre>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_compliant_solution">Compliant Solution</h2>
<div class="sectionbody">
<div class="listingblock">
<div class="content">
<pre>void f ( short ); // Example 1
template &lt;typename T&gt; void f ( T ); // Example 2
void b ( short s )
{
  f&lt;&gt;( s ); // Compliant - Explicitly calls Example 2
  f&lt;&gt;( s + 1 ); // Compliant - Explicitly calls Example 2
}</pre>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_exceptions">Exceptions</h2>
<div class="sectionbody">
<div class="paragraph">
<p>This rule does not apply to copy constructors or copy assignment operators.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_see">See</h2>
<div class="sectionbody">
<div class="ulist">
<ul>
<li>
<p>MISRA C&#43;&#43;:2008, 14-8-2</p>
</li>
</ul>
</div>
</div>
</div>